using System;
using System.Collections.Generic;

namespace Fuse8.DomainFramework.DataAccess.SqlDatabase
{
    /// <summary>
    /// 
    /// </summary>
    public interface IEntityMappingConfiguratorChain : IEntityMappingConfigurator
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="configurator"></param>
        void Add(IEntityMappingConfigurator configurator);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="configurator"></param>
        void AddDefault(IEntityMappingConfigurator configurator);
    }

    /// <summary>
    /// 
    /// </summary>
    public abstract class DefaultEntityMappingConfiguratorForSuccessor : IEntityMappingConfigurator
    {
        /// <summary>
        /// Returns table name by entity type
        /// </summary>
        /// <param name="type">Entity type</param>
        /// <returns></returns>
        public virtual string GetEntityTableName(Type type)
        {
            return null;
        }

        /// <summary>
        /// Returns entity column name by entity type and sql column name
        /// </summary>
        /// <param name="type">Entity type</param>
        /// <param name="column">Sql column name</param>
        /// <returns></returns>
        public virtual string GetEntityColumnAlias(Type type, string column)
        {
            return null;
        }

        /// <summary>
        /// Returns collection of the ignored columns by entity type
        /// </summary>
        /// <param name="type">Entity type</param>
        /// <returns></returns>
        public virtual IEnumerable<string> GetIgnoredColumns(Type type)
        {
            return null;
        }

        /// <summary>
        /// Gest database related name for property
        /// </summary>
        /// <param name="type">Type where specified prorpety situated</param>
        /// <param name="property">Property name</param>
        /// <returns></returns>
        public virtual string GetRelatedPropertyColumnName(Type type, string property)
        {
            return null;
        }
    }
}